﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:odc="clr-namespace:Odyssey.Controls"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Style TargetType="{x:Type odc:RibbonButton}" x:Key="DefaultMaximizeButtonStyle">
        <Setter Property="Foreground" Value="{DynamicResource {ComponentResourceKey odc:Skins, WindowButtonPenColor}}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type odc:RibbonButton}">
                    <odc:RibbonChrome RenderMouseOver="{TemplateBinding IsMouseOver}"
                            RenderPressed="{TemplateBinding IsPressed}" HorizontalContentAlignment="Center"
                            CornerRadius="3">
                        <Grid RenderOptions.EdgeMode="Aliased">
                            <Path Data="M0,0L8,0 8,7 0,7 0,0z" StrokeThickness="1" Stroke="{TemplateBinding Foreground}"
                                    StrokeStartLineCap="Flat" StrokeEndLineCap="Flat" Stretch="None" />
                            <Path Data="M0,1L8,1" StrokeThickness="2" Stroke="{TemplateBinding Foreground}"
                                    StrokeStartLineCap="Flat" StrokeEndLineCap="Flat" Stretch="None" />
                        </Grid>
                    </odc:RibbonChrome>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type odc:RibbonButton}" x:Key="DefaultRestoreButtonStyle">
        <Setter Property="Foreground" Value="{DynamicResource {ComponentResourceKey odc:Skins, WindowButtonPenColor}}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type odc:RibbonButton}">
                    <odc:RibbonChrome RenderMouseOver="{TemplateBinding IsMouseOver}"
                            RenderPressed="{TemplateBinding IsPressed}" HorizontalContentAlignment="Center"
                            CornerRadius="3">
                        <Grid RenderOptions.EdgeMode="Aliased">
                            <Path Data="M0,3L6,3 6,8 0,8 0,4z  M3,2 L3,0L9,0L9,5L7,5" StrokeThickness="1"
                                    Stroke="{TemplateBinding Foreground}" StrokeStartLineCap="Flat"
                                    StrokeEndLineCap="Flat" />
                            <Path Data="M0,4L6,4 M3,1L9,1" ClipToBounds="True" StrokeThickness="2"
                                    Stroke="{TemplateBinding Foreground}" StrokeStartLineCap="Flat"
                                    StrokeEndLineCap="Flat" />
                        </Grid>
                    </odc:RibbonChrome>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type odc:RibbonButton}" x:Key="DefaultMinimizeButtonStyle">
        <Setter Property="Foreground" Value="{DynamicResource {ComponentResourceKey odc:Skins, WindowButtonPenColor}}" />
        <Setter Property="ContentTemplate">
            <Setter.Value>
                <DataTemplate>
                    <Path Data="M0,6,8,6" RenderOptions.EdgeMode="Aliased" StrokeThickness="2"
                            Stroke="{Binding Foreground, RelativeSource={RelativeSource FindAncestor,AncestorType={x:Type odc:RibbonButton}}}"
                            StrokeStartLineCap="Flat" StrokeEndLineCap="Flat" Stretch="None" />
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type odc:RibbonButton}">
                    <odc:RibbonChrome RenderMouseOver="{TemplateBinding IsMouseOver}"
                            RenderPressed="{TemplateBinding IsPressed}" HorizontalContentAlignment="Center"
                            CornerRadius="3" Content="{TemplateBinding Content}"
                            ContentTemplate="{TemplateBinding ContentTemplate}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style TargetType="{x:Type odc:RibbonButton}" x:Key="DefaultCloseButtonStyle">
        <Setter Property="Foreground" Value="{DynamicResource {ComponentResourceKey odc:Skins, WindowButtonPenColor}}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type odc:RibbonButton}">
                    <odc:RibbonChrome RenderMouseOver="{TemplateBinding IsMouseOver}"
                            RenderPressed="{TemplateBinding IsPressed}" HorizontalContentAlignment="Center"
                            CornerRadius="3">
                        <Path Data="M0,0L2,0L4,2L6,0L8,0L8,1L6,3L8,5L8,6L6,6L4,4L2,6L0,6L0,5L2,3L0,1L0,0Z" Width="11"
                                Height="9" RenderOptions.BitmapScalingMode="NearestNeighbor"
                                RenderOptions.EdgeMode="Aliased" StrokeLineJoin="Bevel" StrokeStartLineCap="Square"
                                StrokeEndLineCap="Square" StrokeThickness="0" SnapsToDevicePixels="True" Stretch="Fill"
                                Fill="{TemplateBinding Foreground}" />
                    </odc:RibbonChrome>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>